#include <iostream>
#include <fstream>
#include <gsl/gsl_math.h>
//#include "IOParams.h"
#define DIM 2

using namespace std;

int indx(int , int );
class Gas{
	public:
		int N;
	  double *theta;
		double *omega;
		double *vec_m;
		double *vec_M;
		double *force;
		double Ek;
		double Ep;
		
		Gas(int const);
    ~Gas();
    
    void initCoord();
    void initVeloc();
    
    // Calculate functions
    void calculateVec_m();
    void calculateVec_M();
    void calculateForce(double eps);
    
    // Energy
    void calculateEkin();
    void calculateEpot(double eps);
    
    // Update functions
    void updateCoord(Gas*, double dt, double dt2);
    void updateVeloc(Gas*, double dt);

		// Save data to file
		void writeMacroState(ofstream *ptrfile, int ttime, double dt);
		void writeMicroState(ofstream *ptrfile, int ttime, double dt);
    
    // print functions
    void printCoord();
    void printVeloc();
    void printVec_m();
    void printVec_M();
    void printForce();
};
